home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / X11 / Xmu / Xmu.h < prev   
C/C++ Source or Header  |  2006-04-12  |  4KB  |  129 lines

  1. /* $Xorg: Xmu.h,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */
  2.  
  3. /* 
  4.  
  5. Copyright 1988, 1998  The Open Group
  6.  
  7. Permission to use, copy, modify, distribute, and sell this software and its
  8. documentation for any purpose is hereby granted without fee, provided that
  9. the above copyright notice appear in all copies and that both that
  10. copyright notice and this permission notice appear in supporting
  11. documentation.
  12.  
  13. The above copyright notice and this permission notice shall be included in
  14. all copies or substantial portions of the Software.
  15.  
  16. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  18. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
  19. OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  20. AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  21. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  22.  
  23. Except as contained in this notice, the name of The Open Group shall not be
  24. used in advertising or otherwise to promote the sale, use or other dealings
  25. in this Software without prior written authorization from The Open Group.
  26.  
  27. */
  28. /* $XFree86: xc/lib/Xmu/Xmu.h,v 1.9 2001/12/14 19:55:59 dawes Exp $ */
  29.  
  30. /*
  31.  * The interfaces described by this header file are for miscellaneous utilities
  32.  * and are not part of the Xlib standard.
  33.  */
  34.  
  35. #ifndef _XMU_H_
  36. #define _XMU_H_
  37.  
  38. #include <X11/Intrinsic.h>
  39. #include <X11/Xmu/Atoms.h>        /* _XA_... */
  40. #include <X11/Xmu/CharSet.h>        /* CopyISOLatin1Lowered */
  41. #include <X11/Xmu/Converters.h>        /* CvtStringTo... */
  42. #include <X11/Xmu/Drawing.h>        /* DrawRoundedRect, DrawLogo */
  43. #include <X11/Xmu/Error.h>        /* PrintDefaultError */
  44. #include <X11/Xmu/StdSel.h>        /* ConvertStandardSelection */
  45.  
  46. /*
  47.  * clip lists
  48.  */
  49. typedef struct _XmuSegment {
  50.   int x1, x2;
  51.   struct _XmuSegment *next;
  52. } XmuSegment;
  53.  
  54. typedef struct _XmuScanline {   
  55.   int y;
  56.   XmuSegment *segment;
  57.   struct _XmuScanline *next;
  58. } XmuScanline;
  59.                               
  60. typedef struct _XmuArea {
  61.   XmuScanline *scanline;     
  62. } XmuArea;
  63.  
  64. #define XmuCreateArea()        XmuNewArea(0, 0, 0, 0)
  65. #define XmuAreaOr(dst, src)    XmuAreaOrXor((dst), (src), True)
  66. #define XmuAreaXor(dst, src)    XmuAreaOrXor((dst), (src), False)
  67.  
  68. #define XmuDestroyArea(a)                    \
  69.           do {                        \
  70.             XmuDestroyScanlineList((a)->scanline);    \
  71.             XtFree((char *)(a));            \
  72.           } while (0)
  73.  
  74. #define FreeArea(a)                        \
  75.           do {                        \
  76.             XmuDestroyScanlineList((a)->scanline);    \
  77.             a->scanline = (Scanline *)0;        \
  78.           } while (0)
  79.  
  80. #define XmuValidSegment(s)    ((s)->x1 < (s)->x2)
  81. #define XmuSegmentEqu(s1, s2)    ((s1)->x1 == (s2)->x1 && (s1)->x2 == (s2)->x2)
  82. #define XmuDestroySegment(s)    XtFree((char *)(s))
  83.  
  84. #define XmuDestroyScanline(s)                    \
  85.           do {                        \
  86.             XmuDestroySegmentList((s)->segment);    \
  87.             XtFree((char*)(s));                \
  88.           } while (0)
  89.  
  90. XmuArea *XmuNewArea(int, int, int, int);
  91. XmuArea *XmuAreaDup(XmuArea*);
  92. XmuArea *XmuAreaCopy(XmuArea*, XmuArea*);
  93. XmuArea *XmuAreaNot(XmuArea*, int, int, int, int);
  94. XmuArea *XmuAreaOrXor(XmuArea*, XmuArea*, Bool);
  95. XmuArea *XmuAreaAnd(XmuArea*, XmuArea*);
  96. Bool XmuValidArea(XmuArea*);
  97. Bool XmuValidScanline(XmuScanline*);
  98. Bool XmuScanlineEqu(XmuScanline*, XmuScanline*);
  99. XmuSegment *XmuNewSegment(int, int);
  100. void XmuDestroySegmentList(XmuSegment*);
  101. XmuScanline *XmuScanlineCopy(XmuScanline*, XmuScanline*);
  102. Bool XmuAppendSegment(XmuSegment*, XmuSegment*);
  103. XmuScanline *XmuOptimizeScanline(XmuScanline*);
  104. XmuScanline *XmuScanlineNot(XmuScanline *scanline, int, int);
  105. XmuScanline *XmuScanlineOr(XmuScanline*, XmuScanline*);
  106. XmuScanline *XmuScanlineAnd(XmuScanline*, XmuScanline*);
  107. XmuScanline *XmuScanlineXor(XmuScanline*, XmuScanline*);
  108. XmuScanline *XmuNewScanline(int, int, int);
  109. void XmuDestroyScanlineList(XmuScanline*);
  110. XmuArea *XmuOptimizeArea(XmuArea *area);
  111.  
  112. #ifndef notdef
  113. XmuScanline *XmuScanlineOrSegment(XmuScanline*, XmuSegment*);
  114. XmuScanline *XmuScanlineAndSegment(XmuScanline*, XmuSegment*);
  115. XmuScanline *XmuScanlineXorSegment(XmuScanline*, XmuSegment*);
  116. #endif /* notdef */
  117.  
  118. #ifndef _SYSUTIL_H_
  119. int XmuSnprintf(char *str, int size, _Xconst char *fmt, ...)
  120. #if defined(__GNUC__) && \
  121.     ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ > 4)))
  122. __attribute((format(printf,3,4)))
  123. #endif
  124. ;
  125. #endif
  126.  
  127. #endif /* _XMU_H_ */
  128.  
  129.